<p id="notice"><%= notice %></p>

<h1>Snippets</h1>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Eval</th>
      <th>Code</th>
      <th>Hide</th>
      <th>Example</th>
      <th>Language</th>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @snippets.each do |snippet| %>
      <tr>
        <td><%= snippet.name %></td>
        <td><%= snippet.eval %></td>
        <td><%= snippet.code %></td>
        <td><%= snippet.hide %></td>
        <td><%= snippet.example %></td>
        <td><%= snippet.language %></td>
        <td><%= link_to 'Show', snippet %></td>
        <td><%= link_to 'Edit', edit_snippet_path(snippet) %></td>
        <td><%= link_to 'Destroy', snippet, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Snippet', new_snippet_path %>
